import CodeSnapped from "./dist/treesitter.js";
import { CodeSnippetsCodebaseIndex } from "./src/core/codeSnippetsIndex.js";

const fileDir = "./src/java";
const codeSnappeder = new CodeSnapped();
const result = await codeSnappeder.chunkCode(fileDir);
console.log(result);

// 添加代码片段到数据库中，并包向量的结果保存到 LanceDB
await CodeSnippetsCodebaseIndex.add(result);

